@mixin tooltip {
  display: none;
  min-width: rem(140);
  padding: rem(10) !important;
  background: #061328 !important;
  border: rem(1) solid rgb(255 255 255 / 50%) !important;
  border-radius: 0 !important;
}

.chart {
  position: relative;

  // 修复 ECharts 图表 tooltip 无法显示的问题
  > :nth-child(2) {
    @include tooltip;
  }
}

.tooltip {
  @include tooltip;
}

.tooltip-title {
  font-size: rem(12);
  font-weight: 500;
  line-height: 1;
  color: #fff;

  + .tooltip-content {
    margin-top: rem(10);
  }
}

.tooltip-content {
  // 箭头
  + div {
    background-color: #061328 !important;
    border-color: rgb(255 255 255 / 50%) !important;
  }
}

.tooltip-item {
  display: flex;
  align-items: center;
  /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
  font-family: DINCond-Regular !important;

  + .tooltip-item {
    // margin-top: rem(5);
  }
}

.tooltip-item-legend {
  flex-shrink: 0;
  width: rem(10);
  height: rem(10);
  margin-right: rem(5);
  border-radius: rem(10);
}

.tooltip-item-label {
  min-width: 0;
  margin-right: rem(20);
  margin-left: rem(2);
  font-size: rem(14);
  font-weight: 400;
  color: #fff;
}

.tooltip-item-value {
  margin-left: auto;
  font-size: rem(14);
  font-weight: 900;
  color: #fff;
}

.tooltip-item-value-unit {
  margin-left: rem(5);
}
